Ext.define('HIT.view.SetMainGrid', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.setmaingrid',

    cls: 'custom-grid',
    frame: false,
    width: 1200,
    columnLines: false,
    store: 'Main',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            columns: [
                {
                    xtype: 'rownumberer',
                    resizable: true,
                    width: 30
                },              
                {
                    xtype: 'gridcolumn',
                    width: 160,
                    align: 'left', 
                    style:'text-align:center;',
                    dataIndex:'group_name',
                    text: Share.T('套名称')
                },
                {
                    xtype: 'gridcolumn',
                    align: 'center',
                    width: 120,
                    dataIndex: 'creator',
                    text: Share.T('创建人')
                },
                {
                    xtype: 'gridcolumn',
                    style: 'text-align:center',
                    width: 120,
                    align:'left',
                    style:'text-align:center;',
                    dataIndex: 'create_company',
                    text: Share.T('创建公司')
                },
                {
                    xtype: 'gridcolumn',
                    style: 'text-align:center',
                    width: 150,
                    dataIndex: 'create_time',
                    text: Share.T('创建时间')
                },
                {
                    xtype: 'gridcolumn',
                    style: 'text-align:center',
                    width: 120,
                    align: 'center', 
                    dataIndex: 'isQuote',
                    text: Share.T('是否引用')
                },
                {
                    xtype: 'gridcolumn',
                    style: 'text-align:center',
                    width: 180,
                    dataIndex: 'quote_company',
                    align:'left',
                    style:'text-align:center;',
                    flex: 1,
                    text: Share.T('引用公司')
                },
                {
                    xtype: 'gridcolumn',
                    width: 200,
                    align: 'left',
                    style:'text-align:center;',
                    dataIndex:'group_desc',
                    flex: 1,
                    text: Share.T('套描述')
                }
            ],
            viewConfig: {
            	enableTextSelection:true
            },
            selModel: Ext.create('Ext.selection.CheckboxModel', {
                checkOnly: false
            }),
//            plugins :[{ptype:"rowselectionpaging"}],
            dockedItems: [
                {
                    xtype: 'pagingtoolbar',
                    id:'setmaintoolbar',
                    dock: 'bottom',
                    width: 360,
                    inputItemWidth:45,
                    displayInfo: true,
                    store:'Main',
                    plugins: [{
                        ptype: "pagesize",
                        uxPageSize: page_size}]
                }
            ]
        });

        me.callParent(arguments);
    }

});